package com.dycong.common.IO.calculator.bio;

import java.io.IOException;

/**
 * ���Է���
 *
 * @author yangtao__anxpp.com
 * @version 1.0
 *TODO 两个线程操作同一个socket，一个负责读，一个负责写
 */
public class Test {

    public static void main(String[] args) throws InterruptedException {

        new Thread(new Runnable() {
            @Override
            public void run() {
                try {
                    ServerBetter.start();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }).start();

//		Thread.sleep(100);
//		char operators[] = {'+','-','*','/'};
//		Random random = new Random(System.currentTimeMillis());
//		new Thread(new Runnable() {
//			@SuppressWarnings("static-access")
//			@Override
//			public void run() {
//				while(true){
//					String expression = random.nextInt(10)+""+operators[random.nextInt(4)]+(random.nextInt(10)+1);
//					ClientReader.send(expression);
//					try {
//						Thread.currentThread().sleep(random.nextInt(1000));
//					} catch (InterruptedException e) {
//						e.printStackTrace();
//					}
//				}
//			}
//		}).start();
//	}
    }
}